﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BrokerBase.Lib.Policy;

namespace broker.duty.GS
{
    class Class5
    {
        public void Calc2(IPolicyPeriodActing ppa, IDutyActing da)
        {
            if (ppa.SchemePeriodActing.InsurantStates.Contains("身故"))
            {
                da.Value = ppa.TotalFee;
                ppa.IsCurrentFinish = true;
            }
        }

        public void Calc2(IPolicyPeriodActing ppa, IDutyActing da)
        {
            string a = ppa.PolicyActing.Policy.SelectedColRateFactors["领取年龄"];
            int receiveAge = int.Parse(a.Trim().Substring(0, 2));

            if (ppa.Age >= receiveAge)
            {
                da.Value = ppa.Amount;
            }
        }
    }
}
